# 文件读写

str = """sdlfja;ad;fkladfsdfl
新式的的xxx
12222"""

f = open("test.txt", 'w')
f.write(str)
f.close()

#  打开逐行读取
f = open("test.txt")
while True:
    line = f.readline()
    if len(line) == 0:
        break
    print(line, end='')

f.close()
